#!/usr/bin/perl

@all_file = glob "*";
@ARGV = $ARGV[0]? $ARGV[0] : @all_file;

$err_num = 0;

while (<>) {
		if (/^ERROR/) {
				push @err_info, "$ARGV: $_";
				$err_num++;
		}
		if (/^\*\*ERROR:/) {
				push @err_info, "$ARGV: $_";
				$err_num++;
		}
		if (/^\[ERROR\]/) {
				push @err_info, "$ARGV: $_";
				$err_num++;
		}
		if (/^\[Error\]/) {
				push @err_info, "$ARGV: $_";
				$err_num++;
		}
		if (/^The tool has just encountered a fatal error/) {
				push @err_info, "$ARGV: $_";
				$err_num++;
		}
}

if {$err_num >= 1} {
		print "\nERROR Information:\n";
		print "-----------------------------------------------\n";
		foreach $err (@err_info) {
				print "$err";
		}
		exit 1;
} else {
		#pirnt "No Error find!\n";
		#}




